package edu.xidian.bdilab.jrbigdata.controller.government;

import edu.xidian.bdilab.jrbigdata.controller.response.ResponseResult;
import edu.xidian.bdilab.jrbigdata.service.government.businessStatics.BusinessStaticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api(tags = {"BusinessStatics-政府查看业务统计功能"})
public class BusinessStatisticsController {
    @Autowired
    BusinessStaticsService businessStaticsService;


    @ResponseBody
    @ApiOperation("获取业务统计信息")
    @RequestMapping(value = "government/getBusinessStatics", method = RequestMethod.POST)
    public ResponseResult getBusinessStatics(
    )throws Exception{
        ResponseResult responseResult=businessStaticsService.getBusinessStatics();
        return responseResult;
    }

    @ResponseBody
    @ApiOperation("获取企业申请产品信息")
    @RequestMapping(value = "government/getRequestInfo", method = RequestMethod.POST)
    public ResponseResult getRequestInfo(@RequestParam(defaultValue = "1")@ApiParam(value = "页码") int pageNum,
                                               @RequestParam(defaultValue = "10000")@ApiParam(value = "每页记录数") int pageSize
    )throws Exception{
        ResponseResult responseResult=businessStaticsService.getRequestInfo(pageNum,pageSize);
        return responseResult;
    }

}
